﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace ImageWeb.Models
{
    public class RegisterModel
    {
        /// <summary>
        /// 帐号
        /// </summary>
        [Required(ErrorMessage = "必须输入{0}")]
        [StringLength(10, MinimumLength = 1, ErrorMessage = "{0}长度为{2}-{1}个字符")]
        [Display(Name = "员工号")]
        public string UserNum { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [DataType(DataType.Password)]
        [Required(ErrorMessage = "必须输入{0}")]
        [StringLength(20, MinimumLength = 6, ErrorMessage = "{0}长度少于{1}个字符")]
        [Display(Name = "密码")]
        public string Password { get; set; }        

        /// <summary>
        /// 确认密码
        /// </summary>
        [DataType(DataType.Password)]
        [Required(ErrorMessage = "必须输入{0}")]
        [Compare("Password", ErrorMessage = "两次输入的密码不同")]
        [Display(Name = "确认密码")]
        public string ConfirmPassword { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        [DataType(DataType.EmailAddress)]
        [Required(ErrorMessage = "必须输入{0}")]
        [Display(Name = "邮箱")]
        public string Email { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>        
        [Required(ErrorMessage = "必须输入{0}")]
        [Display(Name = "员工姓名")]
        public string Name { get; set; }

        /// <summary>
        /// 所在厂区（保定，海南，天津，衡水，蠡县）
        /// </summary>        
        [Required(ErrorMessage = "必须输入{0}")]
        [Display(Name = "基地")]
        public string Location { get; set; }

        /// <summary>
        /// 验证码
        /// </summary>

        [Display(Name = "验证码")]
        public string valicode { get; set; }
    
    }
}